import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

/**
 * Created by 我啊 on 2020/01/14.
 */
public class ClientDemo {
    public static void main(String[] args) throws IOException {
        Socket socket=new Socket("127.0.0.1",8864);
        OutputStream outputStream = socket.getOutputStream();
        MsgUtils.writeMsg(outputStream,"链接成功");
        InputStream inputStream = socket.getInputStream();
        String s = MsgUtils.readMsg(inputStream);
        System.out.println(s);
        socket.close();
    }
}
